
/**
 * @author Johannes Riedmann
 * @author Lukas K�ll
 * @author David Medenjak
 */
public abstract class Roboter {

    /**
     * unique id of the robot (unique within a factory)
     */
    private Integer id;
    /**
     * operating hours of the robot
     */
    private Integer operatingHours = 0;
    /**
     * operation mode of the robot
     */
    private OperationMode operationMode;

    /**
     * Constructor.
     * @param id Roboter id.
     * @param operationMode Interface specifying it's operation mode.
     */
    public Roboter(int id, OperationMode operationMode) {
        this.id = id;
        this.operationMode = operationMode;
    }

    /**
     * Gets the roboter's id.
     * @return the robots unique id (unique inside the factory)
     */
    public int getId() {
        return id;
    }

    /**
     * increases the number of operating hours by "increase"
     * @param increase number to add to the operating hours.
     */
    public void increaseOperatingHours(int increase) {
        operatingHours += increase;
    }

    /**
     * Gets the operating hours.
     * @return the operating hours
     */
    public Integer getOperatingHours() {
        return operatingHours;
    }

    /**
     * Returns the name of the operation mode.
     * @return the operation modes name.
     */
    public String getOperationModeName() {
        return operationMode.getName();
    }

    /**
     * Gets the operation mode.
     * @return the operation mode
     */
    public OperationMode getOperationMode() {
        return operationMode;
    }

    /**
     * Sets the mode of the robot.
     * @param operationMode the operationMode to set
     */
    public void setOperationMode(OperationMode operationMode) {
        this.operationMode = operationMode;
    }

    /**
     * Gets the name of the roboter-type.
     * @return the Roboter type
     */
    public abstract String getType();
}
